﻿#region Using namespaces

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Windows.Input;

#endregion

namespace BOL.Apps.GeneNetworkBrowser.ViewModels
{
    public class WindowViewModel : ViewModelBase
    {
        #region Protected variables

        protected RelayCommand _closeCommand;

        #endregion

        #region Public properties

        public ICommand CloseCommand
        {
            get
            {
                if (_closeCommand == null)
                    _closeCommand = new RelayCommand(param => OnClosed());

                return _closeCommand;
            }
        }

        public event EventHandler Closed;

        void OnClosed()
        {
            if (Closed != null)
                Closed(this, EventArgs.Empty);
        }

        #endregion

        #region Constructor

        public WindowViewModel() { }

        #endregion
    }
}
